package com.yyge.config;


import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@Configuration
@ComponentScan("com.yyge")
@ComponentScan(
       // 我要扫描的包的路径，其中包含了 com.yyge.controller
       basePackages = {"com.yyge"},
       //排除不扫描的类
       excludeFilters = {
               @ComponentScan.Filter(
                       // 忽略Controller注解标注的类
                       // 被Controller注解标注的类代表了控制器，交给SpringMvcConfig这个类来管理
                       type = FilterType.ANNOTATION,
                       classes = {Controller.class}
               )
       }
)

@EnableTransactionManagement //开启事务
@Import(value = {JdbcConfig.class,MybatisConfig.class})
@PropertySource("classpath:jdbc.properties")
public class SpringConfig {
}
